
//引入Theaters
const Theaters = require('../model/Theaters');

module.exports = async data => {
  for (let i = 0 ,item; item = data[i++];) {
    await Theaters.create({
      title: item.title,
      rating: item.rating,
      directors: item.directors,
      image: item.image,
      doubanId: item.doubanId,
      href:item.href
    })
}

    console.log('数据保存成功');
  return data
}